home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / SOUND / MP3CONV.ZIP / !MP3Conv / h / sound < prev   
Text File  |  1997-04-01  |  1KB  |  32 lines

  1. /*
  2.  * You can add new audio devices by creating a .c file that supports
  3.  * all the following functions, and making sure it gets compiled in.
  4.  */
  5.  
  6. /*
  7.  * Opens the audio device, or at least takes it so we know we can use
  8.  * it. Returns an integer handle, which is negative if something went wrong.
  9.  */
  10. int sound_open();
  11.  
  12. /*
  13.  * Initializes the device, because now we know stuff like framerate,
  14.  * mono/stereo. This currently looks at some globals, which are of course
  15.  * very mean and ugly. Check the existing .c-files to see what they are.
  16.  * (Eventually they should get de-globalized.) A non-zero return code means
  17.  * something went wrong.
  18.  */
  19. int sound_init(int audiofd, layer *info, int stereo);
  20.  
  21. /*
  22.  * Write length bytes from buffer to the audio device. Returns the number of
  23.  * bytes written or -1 for an error.
  24.  */
  25. int sound_write(int audiofd, const void *buffer, size_t count);
  26.  
  27. /*
  28.  * Closes the audio device, uninitializes it, and whatever else your device
  29.  * needs done. A non-zero return code means something went wrong.
  30.  */
  31. int sound_close(int audiofd);
  32.